package com.hengtuo.student.service.impl;

import java.util.Collection;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Qualifier;
import org.springframework.stereotype.Service;

import com.hengtuo.student.dao.ClassesDao;
import com.hengtuo.student.pojo.Classes;
import com.hengtuo.student.pojo.User;
import com.hengtuo.student.service.ClassesService;
import com.hengtuo.student.service.base.impl.BaseServiceImpl;
import com.hengtuo.student.util.Paginator;
@Service
public class ClassesServiceImpl extends BaseServiceImpl<Classes> implements ClassesService {
	@Autowired
	@Qualifier("classesDaoImpl")
	private ClassesDao classesDao;

	public ClassesDao getClassesDao() {
		return classesDao;
	}

	public void setClassesDao(ClassesDao classesDao) {
		this.classesDao = classesDao;
	}

	@Override
	public Collection<Classes> getAllClasses() {
		
		return this.classesDao.getAllEntry();
	}

	@Override
	public void unbindUser(Classes classes) {
		// TODO Auto-generated method stub
		this.classesDao.unbind(classes);
	}

	@Override
	public Collection<User> getUsersByClass(String id) {
		// TODO Auto-generated method stub
		return this.classesDao.getUsersByClass(id);
	}

	@Override
	public Collection<Classes> queryClassesByUser(String userId) {
		return classesDao.queryClassesByUser(userId);
	}

	@Override
	public void getAllClassesPaginator(Paginator<Classes> userReport) {
		// TODO Auto-generated method stub
		this.classesDao.getAllClassesPaginator(userReport);
	}
}
